package myTest;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class StringFormatTest {
	
	public static void main(String[] args) {
		/*System.out.printf("%6d\n",34);
		System.out.println(String.format("%6d", 34).replace(" ", "0"));
		System.out.printf("%06d\n",34);
		ExecutorService executors = Executors.newFixedThreadPool(1000);
		final StringBuTest stringBuTest = new StringBuTest();
		for (int i = 0; i < 1000; i++) {
			executors.submit(new Runnable() {
				@Override
				public void run() {
					stringBuTest.xx();
				}
			});
		}
		executors.shutdown();*/
		String result = "20160131173936,0\r\n1000131173936585600";
		System.out.println(result.split("\r\n")[0].split(",")[1]);
		System.out.println(result);
		System.out.println("08:00:00".substring(0,2));
		String cardno = "62222220000001111";
		System.out.println(cardno.
				substring(cardno.length()-4, cardno.length()));
	}

}
class StringBuTest{
	private StringBuilder sql = new StringBuilder();
	public void xx(){
		sql.delete(0, sql.length());
		sql.append(" SELECT CR_PACTMANAGE.CIFNO, ");// 0
		sql.append(" SELECT CR_PACTMANAGE.CR_PACTMANAGE, ");// 0
		sql.append(" SELECT CR_PACTMANAGE.CIFNOCR_PACTMANAGECR_PACTMANAGE, ");// 0
		sql.append(" SELECT CR_PACTMANAGE.CIFNOCR_PACTMANAGECR_PACTMANAGECR_PACTMANAGE, ");// 0
		System.out.println(new Date().getTime()+sql.toString());
	}
}

